package com.question.business.dept.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.question.business.dept.entity.Dept;
import com.question.business.dept.model.ao.DeptDropDownAO;
import com.question.business.dept.model.ao.DeptPageAO;
import com.question.business.dept.model.vo.DeptDropDownVO;
import com.question.business.dept.model.vo.DeptVO;
import com.question.common.annotation.DataConvert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 部门Mapper接口
 *
 * @author star
 * @since 2023-09-14
 */
@Mapper
public interface DeptMapper extends BaseMapper<Dept> {
    /**
     * 部门分页查询
     *
     * @param page 分页参数
     * @param ao   请求参数
     * @return Page<DeptVO> 响应参数
     */
    @DataConvert
    Page<DeptVO> queryDeptPage(Page<DeptVO> page, @Param("ao") DeptPageAO ao);

    /**
     * 部门下拉列表查询
     *
     * @param ao 请求参数
     * @return List<DeptDropDownVO> 响应参数
     */
    List<DeptDropDownVO> queryDeptDropDown(DeptDropDownAO ao);
}